package com.yanqu.road.entity.kuang.battle;

import java.util.Comparator;

public class CrossKuangRankSort implements Comparator<CrossKuangRank> {

    @Override
    public int compare(CrossKuangRank o1, CrossKuangRank o2) {
        if (o2.getValue() != o1.getValue()) {
            return Long.compare(o2.getValue(), o1.getValue());
        }
        if (!o2.getParam().equals(o1.getParam())) {
            return Long.compare(Long.parseLong(o2.getParam()), Long.parseLong(o1.getParam()));
        }
        return Long.compare(o1.getTime(), o2.getTime());
    }
}
